package com.fieldchain.ex.fa100.mvp.presenter;

import com.fieldchain.ex.fa100.bean.C2CBean;
import com.fieldchain.ex.fa100.bean.C2CSellBean;
import com.fieldchain.ex.fa100.inter.BoolMsgCallBack;
import com.fieldchain.ex.fa100.mvp.base.MyBasePresenter;
import com.fieldchain.ex.fa100.mvp.callback.C2CSellCallBack;
import com.fieldchain.ex.fa100.mvp.callback.C2CSimpleCallBack;
import com.fieldchain.ex.fa100.mvp.model.C2CSellModle;
import com.fieldchain.ex.fa100.mvp.view.C2CSellView;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/18
 */
public class C2CSellPresenter extends MyBasePresenter<C2CSellModle,C2CSellView> {

    public void unShowDialog(){
        model.unShowDialog();
    }
    public void updateUser(){
        model.updateUser(mContext,new BoolMsgCallBack() {
            @Override
            public void receive(boolean status, String msg) {
                view.setTvSure(status,msg);
            }
        });
    }
    public void getData(){
        model.getData(new C2CSimpleCallBack() {
            @Override
            public void receiveData(C2CBean bean, int code) {
                view.receiveData(bean,code);
            }
        });
    }
    public void recharge(String amount, String password){
        model.recharge(amount, password, new C2CSellCallBack() {
            @Override
            public void requestCallBack(C2CSellBean bean, int code) {
                view.requestCallBack(bean,code);
            }
        });
    }
}
